package behavioral.mediator;

/**
 * @ClassName: Colleague
 * @Description: 抽象同事类
 * @Author: liu-hao
 * @Date: 2023-04-12 23:54
 * @Version: 1.0
 **/
public abstract class Colleague {

    protected Mediator mediator;
    protected String name;

    public Colleague(String name) {
        this.name = name;
    }

    public void setMedium(Mediator mediator) {
        this.mediator = mediator;
    }

    public String getName() {
        return name;
    }

    public abstract void send(String to, String ad);

    public abstract void receive(String from, String ad);
}
